import sys
# file=sys.stdout
# file.write("hello")


# file=open('text','r')
# print(file.read())

#报错
# file=open('text1111','r')
# print(file.read(3))


#不需要写close
# with open ('text','r',encoding='utf-8') as file2:
#     list2 =file2.readline()
#     print(list2)


# str ="day by day"
# with open('text', 'w', encoding='utf-8') as file3:
#     file3.write(str)

# list3 = ["ahhahahah"]
# with open('text', 'a', encoding='utf-8') as file4:
#     file4.writelines(list3)

file=open('text','rb')
print(file.read(3))
print(file.read(2))
print(file.tell())
print(file.seek(2,1))
print(file.tell())

# str ="day by day"
# with open('text', 'w', encoding='utf-8') as file3:
#     file3.write(str)



